//封装API接口
import request from '@/utils/request'

//获取用户列表
export function reqGetDepartments() {
    return request({
        url: '/company/department'
    })
}
//删除部门
export function reqDelDepartments(id) {
    return request({
        url: `/company/department/${id}`,
        method: 'delete'
    })
}
// 添加部门提交表单
export function reqAddDepartments(data) {
    return request({
        url: '/company/department',
        method: 'post',
        data
    })
}

//获取部门详细列表
export function reqGetDepartDetail(id) {
    return request({
        url: `/company/department/${id}`
    })
}
// 编辑部门
export function reqUpdateDepartments(data) {
    return request({
        url: `/company/department/${data.id}`,
        method: 'put',
        data
    })
}